<template>
    <div class="log" >
        <el-table
            v-if="isShow"
            :data="tableData"
            border
            :style="{'width': '100%','height':heights}">
            <el-table-column
                prop="operator"
                label="操作人"
                width="180">
            </el-table-column>
            <el-table-column
                prop="operationtime"
                label="操作时间"
                width="280">
            </el-table-column>
            
            </el-table>
    </div>
    
</template>
<script>
export default {
    props:["exkey",'data'],
    data(){
        return{
            name:"",
            name2:"",
            sCode:"",
            sId:"",
            tableData:[],
            heights:"",
            isShow:false
        }
    },
    created(){
        this.sCode=localStorage.getItem("sCode");
        this.name=this.exkey.name;
        this.name2=this.exkey.name2;
        let ids=this.exkey.sId.split(".");
        this.sId=this.data[ids[0]][ids[1]]
        if(this.exkey.height){
            this.heights=this.exkey.height;
        }
        this.isShow=true;
        this.loadLog();
    },
    methods:{
        loadLog(){
            this.$post("business","/log/getLogStatus",{sCode:this.sCode,name:this.name,name2:this.name2,sId:this.sId}).then(data=>{
                this.tableData=data.data;
            })
        }
    }

}
</script>
<style scoped>
.log{
    width:100%;
    height:100%;
}
</style>